var { findX } = require('./findX')

var obj = [
  {
    value: 1,
    label: '一级',
    children: [
      { value: 11, label: '1.1' },
      { value: 12, label: '1.2' }
    ]
  },
  {
    value: 2,
    label: '二级',
    children: [
      { value: 21, label: '2.1' },
      { value: 22, label: '2.2' }
    ]
  },
  {
    value: 3,
    label: '三级',
    children: [
      { value: 31, label: '3.1' },
      { value: 32, label: '3.2' }
    ]
  }
]

console.log(obj.findX([{ value: 1 }, 'children', { value: 12 }]))
// console.log(findX)
console.log(findX(obj, [{ value: 1 }, 'children', { value: 12 }]))
